3.1.53 \(\int \text {csch}(c+d x) (a+b \tanh ^3(c+d x)) \, dx\) [53]

Optimal. Leaf size=49 \[ \frac {b \text {ArcTan}(\sinh (c+d x))}{2 d}-\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}-\frac {b \text {sech}(c+d x) \tanh (c+d x)}{2 d} \]

[Out]

1/2*b*arctan(sinh(d*x+c))/d-a*arctanh(cosh(d*x+c))/d-1/2*b*sech(d*x+c)*tanh(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3747, 3855, 2691} \begin {gather*} -\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}+\frac {b \text {ArcTan}(\sinh (c+d x))}{2 d}-\frac {b \tanh (c+d x) \text {sech}(c+d x)}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csch[c + d*x]*(a + b*Tanh[c + d*x]^3),x]

[Out]

(b*ArcTan[Sinh[c + d*x]])/(2*d) - (a*ArcTanh[Cosh[c + d*x]])/d - (b*Sech[c + d*x]*Tanh[c + d*x])/(2*d)

Rule 2691

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(a*Sec[e +
 f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Dist[b^2*((n - 1)/(m + n - 1)), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3747

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> Int[ExpandTrig[(d*sin[e + f*x])^m*(a + b*(c*tan[e + f*x])^n)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n},
x] && IGtQ[p, 0]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \text {csch}(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx &=i \int \left (-i a \text {csch}(c+d x)-i b \text {sech}(c+d x) \tanh ^2(c+d x)\right ) \, dx\\ &=a \int \text {csch}(c+d x) \, dx+b \int \text {sech}(c+d x) \tanh ^2(c+d x) \, dx\\ &=-\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}-\frac {b \text {sech}(c+d x) \tanh (c+d x)}{2 d}+\frac {1}{2} b \int \text {sech}(c+d x) \, dx\\ &=\frac {b \tan ^{-1}(\sinh (c+d x))}{2 d}-\frac {a \tanh ^{-1}(\cosh (c+d x))}{d}-\frac {b \text {sech}(c+d x) \tanh (c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 75, normalized size = 1.53 \begin {gather*} \frac {b \text {ArcTan}(\sinh (c+d x))}{2 d}-\frac {a \log \left (\cosh \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a \log \left (\sinh \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {b \text {sech}(c+d x) \tanh (c+d x)}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csch[c + d*x]*(a + b*Tanh[c + d*x]^3),x]

[Out]

(b*ArcTan[Sinh[c + d*x]])/(2*d) - (a*Log[Cosh[c/2 + (d*x)/2]])/d + (a*Log[Sinh[c/2 + (d*x)/2]])/d - (b*Sech[c
+ d*x]*Tanh[c + d*x])/(2*d)

________________________________________________________________________________________

Maple [C] Result contains complex when optimal does not.
time = 2.89, size = 101, normalized size = 2.06

method result size
risch \(-\frac {b \,{\mathrm e}^{d x +c} \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{2}}+\frac {i b \ln \left ({\mathrm e}^{d x +c}+i\right )}{2 d}-\frac {i b \ln \left ({\mathrm e}^{d x +c}-i\right )}{2 d}+\frac {a \ln \left ({\mathrm e}^{d x +c}-1\right )}{d}-\frac {a \ln \left ({\mathrm e}^{d x +c}+1\right )}{d}\) \(101\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csch(d*x+c)*(a+b*tanh(d*x+c)^3),x,method=_RETURNVERBOSE)

[Out]

-b*exp(d*x+c)*(exp(2*d*x+2*c)-1)/d/(1+exp(2*d*x+2*c))^2+1/2*I*b/d*ln(exp(d*x+c)+I)-1/2*I*b/d*ln(exp(d*x+c)-I)+
a/d*ln(exp(d*x+c)-1)-a/d*ln(exp(d*x+c)+1)

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 83, normalized size = 1.69 \begin {gather*} -b {\left (\frac {\arctan \left (e^{\left (-d x - c\right )}\right )}{d} + \frac {e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} + \frac {a \log \left (\tanh \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)*(a+b*tanh(d*x+c)^3),x, algorithm="maxima")

[Out]

-b*(arctan(e^(-d*x - c))/d + (e^(-d*x - c) - e^(-3*d*x - 3*c))/(d*(2*e^(-2*d*x - 2*c) + e^(-4*d*x - 4*c) + 1))
) + a*log(tanh(1/2*d*x + 1/2*c))/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 522 vs. \(2 (45) = 90\).
time = 0.37, size = 522, normalized size = 10.65 \begin {gather*} -\frac {b \cosh \left (d x + c\right )^{3} + 3 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{3} - {\left (b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, b \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) - b \cosh \left (d x + c\right ) + {\left (a \cosh \left (d x + c\right )^{4} + 4 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a \sinh \left (d x + c\right )^{4} + 2 \, a \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, a \cosh \left (d x + c\right )^{2} + a\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (a \cosh \left (d x + c\right )^{3} + a \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) - {\left (a \cosh \left (d x + c\right )^{4} + 4 \, a \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + a \sinh \left (d x + c\right )^{4} + 2 \, a \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, a \cosh \left (d x + c\right )^{2} + a\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (a \cosh \left (d x + c\right )^{3} + a \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right ) + {\left (3 \, b \cosh \left (d x + c\right )^{2} - b\right )} \sinh \left (d x + c\right )}{d \cosh \left (d x + c\right )^{4} + 4 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + d \sinh \left (d x + c\right )^{4} + 2 \, d \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)*(a+b*tanh(d*x+c)^3),x, algorithm="fricas")

[Out]

-(b*cosh(d*x + c)^3 + 3*b*cosh(d*x + c)*sinh(d*x + c)^2 + b*sinh(d*x + c)^3 - (b*cosh(d*x + c)^4 + 4*b*cosh(d*
x + c)*sinh(d*x + c)^3 + b*sinh(d*x + c)^4 + 2*b*cosh(d*x + c)^2 + 2*(3*b*cosh(d*x + c)^2 + b)*sinh(d*x + c)^2
 + 4*(b*cosh(d*x + c)^3 + b*cosh(d*x + c))*sinh(d*x + c) + b)*arctan(cosh(d*x + c) + sinh(d*x + c)) - b*cosh(d
*x + c) + (a*cosh(d*x + c)^4 + 4*a*cosh(d*x + c)*sinh(d*x + c)^3 + a*sinh(d*x + c)^4 + 2*a*cosh(d*x + c)^2 + 2
*(3*a*cosh(d*x + c)^2 + a)*sinh(d*x + c)^2 + 4*(a*cosh(d*x + c)^3 + a*cosh(d*x + c))*sinh(d*x + c) + a)*log(co
sh(d*x + c) + sinh(d*x + c) + 1) - (a*cosh(d*x + c)^4 + 4*a*cosh(d*x + c)*sinh(d*x + c)^3 + a*sinh(d*x + c)^4
+ 2*a*cosh(d*x + c)^2 + 2*(3*a*cosh(d*x + c)^2 + a)*sinh(d*x + c)^2 + 4*(a*cosh(d*x + c)^3 + a*cosh(d*x + c))*
sinh(d*x + c) + a)*log(cosh(d*x + c) + sinh(d*x + c) - 1) + (3*b*cosh(d*x + c)^2 - b)*sinh(d*x + c))/(d*cosh(d
*x + c)^4 + 4*d*cosh(d*x + c)*sinh(d*x + c)^3 + d*sinh(d*x + c)^4 + 2*d*cosh(d*x + c)^2 + 2*(3*d*cosh(d*x + c)
^2 + d)*sinh(d*x + c)^2 + 4*(d*cosh(d*x + c)^3 + d*cosh(d*x + c))*sinh(d*x + c) + d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tanh ^{3}{\left (c + d x \right )}\right ) \operatorname {csch}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)*(a+b*tanh(d*x+c)**3),x)

[Out]

Integral((a + b*tanh(c + d*x)**3)*csch(c + d*x), x)

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 74, normalized size = 1.51 \begin {gather*} \frac {b \arctan \left (e^{\left (d x + c\right )}\right ) - a \log \left (e^{\left (d x + c\right )} + 1\right ) + a \log \left ({\left | e^{\left (d x + c\right )} - 1 \right |}\right ) - \frac {b e^{\left (3 \, d x + 3 \, c\right )} - b e^{\left (d x + c\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)*(a+b*tanh(d*x+c)^3),x, algorithm="giac")

[Out]

(b*arctan(e^(d*x + c)) - a*log(e^(d*x + c) + 1) + a*log(abs(e^(d*x + c) - 1)) - (b*e^(3*d*x + 3*c) - b*e^(d*x
+ c))/(e^(2*d*x + 2*c) + 1)^2)/d

________________________________________________________________________________________

Mupad [B]
time = 2.47, size = 233, normalized size = 4.76 \begin {gather*} \frac {2\,b\,{\mathrm {e}}^{c+d\,x}}{d+2\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}+d\,{\mathrm {e}}^{4\,c+4\,d\,x}}-\frac {a\,\ln \left (-8\,a\,b^2-32\,a^3-32\,a^3\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-8\,a\,b^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\right )}{d}+\frac {a\,\ln \left (8\,a\,b^2+32\,a^3-32\,a^3\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-8\,a\,b^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\right )}{d}-\frac {b\,\left (\ln \left (4\,b^3\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+16\,a^2\,b\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-a^2\,b\,16{}\mathrm {i}-b^3\,4{}\mathrm {i}\right )\,1{}\mathrm {i}-\ln \left (4\,b^3\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+16\,a^2\,b\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+a^2\,b\,16{}\mathrm {i}+b^3\,4{}\mathrm {i}\right )\,1{}\mathrm {i}\right )}{2\,d}-\frac {b\,{\mathrm {e}}^{c+d\,x}}{d+d\,{\mathrm {e}}^{2\,c+2\,d\,x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*tanh(c + d*x)^3)/sinh(c + d*x),x)

[Out]

(2*b*exp(c + d*x))/(d + 2*d*exp(2*c + 2*d*x) + d*exp(4*c + 4*d*x)) - (a*log(- 8*a*b^2 - 32*a^3 - 32*a^3*exp(d*
x)*exp(c) - 8*a*b^2*exp(d*x)*exp(c)))/d + (a*log(8*a*b^2 + 32*a^3 - 32*a^3*exp(d*x)*exp(c) - 8*a*b^2*exp(d*x)*
exp(c)))/d - (b*(log(4*b^3*exp(d*x)*exp(c) - b^3*4i - a^2*b*16i + 16*a^2*b*exp(d*x)*exp(c))*1i - log(a^2*b*16i
 + b^3*4i + 4*b^3*exp(d*x)*exp(c) + 16*a^2*b*exp(d*x)*exp(c))*1i))/(2*d) - (b*exp(c + d*x))/(d + d*exp(2*c + 2
*d*x))

________________________________________________________________________________________